import loadable from "../utils/loadable";

const routes = [{
        from: "/",
        to: "/login"
    },
    {
        path: "/app",
        component: loadable(() => import('../pages/App')),
        children:[
            {
                from:"/app",
                to:"/app/house"
            },
            {
                path:"/app/house",
                name:"房源管理",
                component:loadable(()=>import('../pages/App/children/House'))
            },
            {
                path:"/app/live",
                name:"直播管理",
                component:loadable(()=>import('../pages/App/children/Live'))
            },
            {
                path:"/app/groupBuying",
                name:"团购管理",
                component:loadable(()=>import('../pages/App/children/GroupBuying'))
            },
            {
                path:"/app/audit",
                name:"审核管理",
                component:loadable(()=>import('../pages/App/children/Audit'))
            },
            {
                path:"/app/order",
                name:"订单管理",
                component:loadable(()=>import('../pages/App/children/Order'))
            },
            {
                path:"/app/information",
                name:"资讯管理",
                component:loadable(()=>import('../pages/App/children/Information'))
            },
            {
                path:"/app/broker",
                name:"经纪人管理",
                component:loadable(()=>import('../pages/App/children/Broker'))
            },
        ]
    },
    {
        path: "/liveRoom",
        component: loadable(() => import('../pages/LiveRoom')),
    },
    {
        path: "/login",
        component: loadable(() => import('../pages/Login')),
    },
];

export default routes